<include file="public@header" />
</head>
<body>
	<div class="wrap">
		<ul class="nav nav-tabs">
			<li><a href="{:url('index')}">材料列表</a></li>
			<if condition="auth_check('add')"><li><a href="{:url('add')}">添加</a></li></if>
			<li class="active"><a href="">编辑</a></li>
		</ul>
		<form method="post" class="form-horizontal js-ajax-form margin-top-20" action="">
			<div class="form-group">
				<label for="input-name" class="col-sm-2 control-label"><span class="form-required">*</span>公司名称</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control" id="input-name" required name="name" value="{$result.name}">
				</div>
			</div>
			<div class="form-group">
				<label for="input-reg_time" class="col-sm-2 control-label"><span class="form-required">*</span>注册日期</label>
				<div class="col-md-6 col-sm-10">
					<input type="text" class="form-control js-bootstrap-date" id="input-reg_time" required name="reg_time" value="{$result.reg_time|date='Y-m-d',###}">
				</div>
			</div>
			<eq name="result.type" value="2">
				<div class="form-group">
					<label for="input-no" class="col-sm-2 control-label"><span class="form-required">*</span>公司编号</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-no" required name="no" value="{$result.no}">
					</div>
				</div>
				<div class="form-group">
					<label for="input-annual_audit_time" class="col-sm-2 control-label"><span class="form-required">*</span>年审时间</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control js-bootstrap-date" id="input-annual_audit_time" required name="annual_audit_time" value="{$result.annual_audit_time|date='Y-m-d',###}">
					</div>
				</div>
				<div class="form-group">
					<label for="input-shareholder" class="col-sm-2 control-label">股东</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-shareholder" name="shareholder" value="{$result.shareholder}">
					</div>
				</div>
				<div class="form-group">
					<label for="input-director" class="col-sm-2 control-label">董事</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-director" name="director" value="{$result.director}">
					</div>
				</div>
				<div class="form-group">
					<label for="input-address" class="col-sm-2 control-label">联系地址</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-address" name="address" value="{$result.address}">
					</div>
				</div>
				<div class="form-group">
					<label for="input-tel" class="col-sm-2 control-label">联系电话</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-tel" name="tel" value="{$result.tel}">
					</div>
				</div>
				<div class="form-group">
					<label for="input-annual_audit_time" class="col-sm-2 control-label">消费</label>
					<div class="col-md-6 col-sm-10">
						<volist name="types" id="vo">
							<eq name="vo.cid" value="2">
								<div class="input-group">
									<div class="input-group-addon">{$vo.name}</div>
									<input type="number" class="form-control" name="cost[2][{$vo.id}]" value="{$vo.cost}">
								</div>
							</eq>
						</volist>
					</div>
				</div>
			<else/>
				<div class="form-group">
					<label for="input-corporation" class="col-sm-2 control-label"><span class="form-required">*</span>法人</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-corporation" required name="corporation" value="{$result.corporation}">
					</div>
				</div>
				<div class="form-group">
					<label for="input-registered_capital" class="col-sm-2 control-label"><span class="form-required">*</span>注册资金</label>
					<div class="col-md-6 col-sm-10">
						<input type="text" class="form-control" id="input-registered_capital" required name="registered_capital" value="{$result.registered_capital}">
					</div>
				</div>
				<div class="form-group">
					<label for="input-annual_audit_time" class="col-sm-2 control-label">成本</label>
					<div class="col-md-6 col-sm-10">
						<volist name="types" id="vo">
							<eq name="vo.cid" value="1">
								<div class="input-group">
									<div class="input-group-addon">{$vo.name}</div>
									<input type="number" class="form-control" name="cost[1][{$vo.id}]" value="{$vo.cost}">
								</div>
							</eq>
						</volist>
					</div>
				</div>
			</eq>
			<div class="form-group">
				<div class="col-sm-offset-2 col-sm-10">
					<input type="hidden" name="id" value="{$result.id}"/>
					<button type="submit" class="btn btn-primary js-ajax-submit">保存</button>
					<a class="btn btn-default" href="javascript:history.back(-1);">返回</a>
				</div>
			</div>
		</form>
	</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>